package com.csjbot.weedle_auto.SerialServer.util.bean

/**
 * Created by chenqi on 8/7/17.
 */

object SerialPortConstants {
    /**
     * 定义头 header
     */
    val header = 0xAA.toByte()
    val OTHER_HEADER = 0xBB.toByte()

    /**
     * 其他指令，超声、红外、急停。
     */
    object OTHER {
        val SRC = 0x12.toByte()
        val REF = 0x80.toByte()
        val CMD = 0x11.toByte()
        val LENGTH = 0x00.toByte()
        val OTHER_BODY = 0x00.toByte()
    }

    /**
     * 上身sn
     */
    object SN_UP {
        val SRC = 0x12.toByte()
        val REF = 0x80.toByte()
        val CMD = 0x0B.toByte()
        val LENGTH = 0x00.toByte()
    }

    /**
     * 下身sn
     */
    object SN_DOWN {
        val SRC = 0x12.toByte()
        val REF = 0x80.toByte()
        val CMD = 0x10.toByte()
        val LENGTH = 0x00.toByte()
    }

    /**
     *
     */
    val BT = 115200
    val path = "/dev/ttyS4"
}
